/**
* @description 高亮关键词
* @str {string} 源字段
* @keyword {string} 关键词
* @color {strings} 关键词颜色
* @return {string}
* */
const highlightKeywords = (str : string,keyword : string,color = 'blue') => {
    const  reg = new RegExp(keyword, 'ig')
    return  str.replace(reg, (n) => `<span style='color:${color}'>${n}</span>`);
}
export  default highlightKeywords;